Unity Bullet script

56

Unity Bullet script -

public class BulletType : MonoBehaviour
{
    // Protected is less stric than private, more stric than public
    // Protected variables only accesible to this class and its child.
    protected string name;
    protected int bulletDamage;
    protected int bulletSpeed;

    protected virtual void Start()
    {

    }

    // Virtual means you can override this method in child classes
    protected virtual void Damage() { }

    public virtual void PlaySound() { }

    protected virtual void ShowEffect() { }
}

Comments

Submit
0 Comments